﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Foothill.Common
{
    public static class GlobalSettings
    {
        public static readonly int StartYear = 1990;

        public static readonly int MaxNumOfUploadPhotos = 16;

        public static readonly int AdDescriptionMaxNumOfChars = 5000;

        // folder that contains all the upladed photo
        public static readonly string UploadPhotoFolder = "~\\upload_photo";

        // folder that contains all the thumbnails for the upladed photos
        public static readonly string ThumbnailFolder = "~\\upload_thumbnail";

        public static readonly string PhotoNotAvailablePath = "~\\Images\\photo_not_available.jpg";

        public static readonly string UserLogoFolder = "~\\user_logo";

        public static readonly string UserProfilePhotoFolder = "~\\profile_photo";

        public static readonly string DefaultProfilePhoto = "~\\Images\\defaultprofile.jpg";

        public static readonly string DefaultLogoPhoto = "~\\Images\\defaultlogo.gif";

        // size of the thumbnail greated after user upload a photo
        public static readonly int ThumbnailWidth = 160;
        public static readonly int ThumbnailHeight = 120;

        public static readonly int StandardPhotoWidth = 600;
        public static readonly int StandardPhotoHeight = 450;

        public static readonly int EditKeyLength = 6;

        // # of ad's per page on the ad list page
        public static readonly int AdListPageSize = 10;

        public static readonly int PostsByUserPageSize = 8;

        public static readonly int UserSavedListPageSize = 8;

        public static readonly int AdListDescriptionLength = 150;

        // a new post is active for 90 days
        public static readonly int NumberOfDaysActive = 90;

        // the max size allowed for the upload photo in byte (4M)
        public static readonly int UploadPhotoMaxSize = 1000 * 1000 * 4;

        public static readonly int PasswordMinLength = 6;

        public static readonly int PasswordMaxLength = 20;

        public static readonly int ActivateAccountTokenExpiryDay = 3;
    }

    public static class UICultureName
    {
        public static string EN_US = "en-us";

        public static string ZH_CN = "zh-cn";
    }

    public enum AdType
    {
        ForSale = 1, TransferLease = 2
    }

    public enum fhSortDirection
    {
        ASC, DESC
    }

    public enum PriceRange
    {
        P5K, P10K, P20K, P30K, P50K, P80K, P100K, P150K, P200K, Any
    }

    public enum MileageRange
    {
        LessThan5K, LessThan10K, LessThan20K, LessThan30K, LessThan50K, LessThan80K, LessThan100K, Any
    }

    public static class GlobalQueryString
    {
        public static readonly string AdvSearchQsName = "as";

        public static readonly string AdvSearchQsValue = "1";

        public static readonly string AdDetailsQsName = "id";

        public static readonly string FromSearchListQsName = "fsl";

        public static readonly string EditPostIdQsName = "id";

        public static readonly string EditPostEditKeyQsName = "editkey";

        public static readonly string AuthCodeQsName = "auth";

        public static readonly string RecoverPwdEmailQsName = "email";
    }

    public enum AdListCategory
    {
        City, Condition, ListingType, TransmissionType, Make, Mileage, YearAge
    }
}
